package remote.gummachine;

public class Client {
    public static void main(String[] args) throws InterruptedException {
        GumballMachine gumballMachine = new GumballMachine(1);
        System.out.println("---------------begin-------------");
        gumballMachine.operateTheMachine();
        Thread.sleep(1000);

        System.out.println("---------------insert------------");
        gumballMachine.insertQuarter();
        gumballMachine.operateTheMachine();
        Thread.sleep(1000);

        System.out.println("---------------eject-----------");
        gumballMachine.ejectQuarter();
        gumballMachine.operateTheMachine();
        Thread.sleep(1000);

        System.out.println("---------------turn crank-----------");
        gumballMachine.turnCrank();
        gumballMachine.operateTheMachine();
        Thread.sleep(1000);

        System.out.println("---------------dispense-----------");
        gumballMachine.dispense();
        gumballMachine.operateTheMachine();
        Thread.sleep(1000);

        System.out.println("---------------get gum ball-----------");
        gumballMachine.setState(gumballMachine.getNoQuarterState());
        gumballMachine.insertQuarter();
        gumballMachine.turnCrank();
        gumballMachine.dispense();

        gumballMachine.insertQuarter();
        gumballMachine.turnCrank();
        gumballMachine.dispense();


    }
}
